package com.services;

import java.util.List;

import com.DAO.StaffManageRepository;
import com.DAO.impl.StaffManageRepositoryImpl;
import com.beans.Staff;

public class StaffService {
	private StaffManageRepository staff = new StaffManageRepositoryImpl();
	 
	 public List<Staff> selectAll(){
		 return staff.selectAll();
	 }
	 public void delete(int staffSno) {
		 staff.delete(staffSno);
	 }
	  
	 public Staff findById(int staffSno) {
		return  staff.findById(staffSno);
	 }
	 
	 public void add(int staffSno,String name,String sex ,int departmentSno,String post,String username,String password) {
		 staff.add(staffSno, name,sex ,departmentSno,post,username, password);
	}
	 public void update(int staffSno,String name,String sex,int departmentSno,String post) {
		 staff.update(staffSno, name, sex, departmentSno,post);
	 }
}
